<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>函数 - 早起的年轻人</title>
    <meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>

<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<meta name="theme-color" content="#f8f5ec" />
<meta name="msapplication-navbutton-color" content="#f8f5ec">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#f8f5ec">


<meta name="author" content="早起的年轻人" /><meta name="description" content=" OS X 特定 Bash 风格的好用函数集合。Awesome OS X Command Line 的一部分。
" /><meta name="keywords" content="管理, Github, Vue, flutter, Go" />






<meta name="generator" content="Hugo 0.79.1 with even 4.0.0" />


<link rel="canonical" href="https://luckly.work/post/awesome-macos-command-line-zh/functions/" />
<link href="/post/awesome-macos-command-line-zh/functions/" rel="alternate" type="application/rss+xml" title="早起的年轻人" />
<link href="/post/awesome-macos-command-line-zh/functions/" rel="feed" type="application/rss+xml" title="早起的年轻人" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">

<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<link href="/dist/even.06658218.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.css" integrity="sha256-7TyXnr2YU040zfSP+rEcz29ggW4j56/ujTPwjMzyqFY=" crossorigin="anonymous">
<link rel="stylesheet" href="/css/reset-even.css">


<meta property="og:title" content="函数" />
<meta property="og:description" content="
OS X 特定 Bash 风格的好用函数集合。Awesome OS X Command Line 的一部分。
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://luckly.work/post/awesome-macos-command-line-zh/functions/" />
<meta property="article:published_time" content="2019-05-01T14:25:24+08:00" />
<meta property="article:modified_time" content="2019-05-01T14:25:24+08:00" />
<meta itemprop="name" content="函数">
<meta itemprop="description" content="
OS X 特定 Bash 风格的好用函数集合。Awesome OS X Command Line 的一部分。
">
<meta itemprop="datePublished" content="2019-05-01T14:25:24+08:00" />
<meta itemprop="dateModified" content="2019-05-01T14:25:24+08:00" />
<meta itemprop="wordCount" content="699">



<meta itemprop="keywords" content="Awesome," />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="函数"/>
<meta name="twitter:description" content="
OS X 特定 Bash 风格的好用函数集合。Awesome OS X Command Line 的一部分。
"/>

</head>
<body>
<div id="mobile-navbar" class="mobile-navbar">
    <div class="mobile-header-logo">
        <a href="/" class="logo">早起的年轻人</a>
    </div>
    <div class="mobile-navbar-icon">
        <span></span>
        <span></span>
        <span></span>
    </div>
</div>
<nav id="mobile-menu" class="mobile-menu slideout-menu">
    <ul class="mobile-menu-list">
        <a href="/">
            <li class="mobile-menu-item" title="首页">首页</li>
        </a>
        <a href="/post/">
            <li class="mobile-menu-item" title="归档">归档</li>
        </a>
        <a href="/categories/">
            <li class="mobile-menu-item" title="分类">分类</li>
        </a>
        <a href="/tags/">
            <li class="mobile-menu-item" title="标签">标签</li>
        </a>
        <a href="/about/">
            <li class="mobile-menu-item" title="关于我">关于我</li>
        </a>
        <a href="/friend/">
            <li class="mobile-menu-item" title="友链">友链</li>
        </a>
        <a href="https://github.com/ITmxs/">
            <li class="mobile-menu-item" title="阅读清单">阅读清单</li>
        </a>
        
    </ul>
    <form class="search-form" style="position: absolute;">
    <input name="search" type="search" style="height: 28px;padding-left: 30px;"/>
    <input type="image" src="/img/search.svg" alt="Search" style="position: absolute;left: 6px;top: 6px;"/>
</form>


</nav>

<div class="container" id="mobile-panel">
    <header id="header" class="header">
        <div class="logo-wrapper">
  <a href="/%20/" class="logo">早起的年轻人</a>
</div>

<nav class="site-navbar">
  <ul id="menu" class="menu">
    <li class="menu-item">
      <a class="menu-item-link" href="/">首页</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/post/">归档</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/categories/">分类</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/tags/">标签</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/about/">关于我</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/friend/">友链</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="https://github.com/ITmxs/">阅读清单</a>
    </li>
  </ul>
</nav>
        <form class="search-form" style="position: absolute;">
    <input name="search" type="search" style="height: 28px;padding-left: 30px;"/>
    <input type="image" src="/img/search.svg" alt="Search" style="position: absolute;left: 6px;top: 6px;"/>
</form>



    </header>


    <main id="main" class="main">
        <div class="content-wrapper">
            <div id="content" class="content">
                <article class="post">
  
  <header class="post-header">
    <h1 class="post-title">函数</h1>

    <div class="post-meta">
      <span class="post-time"> 2019-05-01 14:25 </span>
      <div class="post-category">
        <a href="/categories/Mac/"> Mac </a>
        </div>
      <span class="more-meta"> 约 699 字 </span>
      <span class="more-meta"> 预计阅读 2 分钟 </span>
      <span id="busuanzi_container_page_pv" class="more-meta"> <span id="busuanzi_value_page_pv"><img src="/img/spinner.svg" alt="spinner.svg"/></span> 次阅读 </span>
    </div>
  </header>

  <div class="post-toc" id="post-toc">
  <h2 class="post-toc-title">文章目录</h2>
  <div class="post-toc-content">
    <nav id="TableOfContents">
  <ul>
    <li>
      <ul>
        <li><a href="#开发者">开发者</a>
          <ul>
            <li><a href="#应用图标">应用图标</a></li>
            <li><a href="#助手功能">助手功能</a></li>
          </ul>
        </li>
        <li><a href="#访达">访达</a>
          <ul>
            <li><a href="#获取最前面的访达窗口的路径">获取最前面的访达窗口的路径</a></li>
            <li><a href="#打印访达中选中的文件">打印访达中选中的文件</a></li>
            <li><a href="#将当前访达文件目录设置为分栏视图">将当前访达文件目录设置为分栏视图</a></li>
            <li><a href="#将当前访达文件目录设置为图标视图">将当前访达文件目录设置为图标视图</a></li>
            <li><a href="#将当前访达文件目录设置为列表视图">将当前访达文件目录设置为列表视图</a></li>
          </ul>
        </li>
      </ul>
    </li>
  </ul>
</nav>
  </div>
</div>
  <div class="post-outdated">
    <div class="warn">
      <p>【注意】最后更新于 <span class="timeago" datetime="2019-05-01T14:25:24" title="May 1, 2019">May 1, 2019</span>，文中内容可能已过时，请谨慎使用。</p>
    </div>
  </div>
  <div class="post-content">
    <blockquote>
<p>OS X 特定 Bash 风格的好用函数集合。<a href="https://github.com/nusr/awesome-macos-command-line-zh">Awesome OS X Command Line</a> 的一部分。</p>
</blockquote>
<h2 id="开发者">开发者</h2>
<h3 id="应用图标">应用图标</h3>
<h4 id="创建应用图标">创建应用图标</h4>
<p>由 1024 x 1024 图片快速创建应用图标的函数。</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="k">function</span> mkicns<span class="o">()</span> <span class="o">{</span>
    <span class="k">if</span> <span class="o">[[</span> -z <span class="s2">&#34;</span><span class="nv">$@</span><span class="s2">&#34;</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span>
        <span class="nb">echo</span> <span class="s2">&#34;Input file missing&#34;</span>
    <span class="k">else</span>
        <span class="nv">filename</span><span class="o">=</span><span class="si">${</span><span class="nv">1</span><span class="p">%.*</span><span class="si">}</span>
        mkdir <span class="nv">$filename</span>.iconset
        sips -z <span class="m">16</span> <span class="m">16</span>   <span class="nv">$1</span> --out <span class="nv">$filename</span>.iconset/icon_16x16.png
        sips -z <span class="m">32</span> <span class="m">32</span>   <span class="nv">$1</span> --out <span class="nv">$filename</span>.iconset/icon_16x16@2x.png
        sips -z <span class="m">32</span> <span class="m">32</span>   <span class="nv">$1</span> --out <span class="nv">$filename</span>.iconset/icon_32x32.png
        sips -z <span class="m">64</span> <span class="m">64</span>   <span class="nv">$1</span> --out <span class="nv">$filename</span>.iconset/icon_32x32@2x.png
        sips -z <span class="m">128</span> <span class="m">128</span> <span class="nv">$1</span> --out <span class="nv">$filename</span>.iconset/icon_128x128.png
        sips -z <span class="m">256</span> <span class="m">256</span> <span class="nv">$1</span> --out <span class="nv">$filename</span>.iconset/icon_128x128@2x.png
        sips -z <span class="m">256</span> <span class="m">256</span> <span class="nv">$1</span> --out <span class="nv">$filename</span>.iconset/icon_256x256.png
        sips -z <span class="m">512</span> <span class="m">512</span> <span class="nv">$1</span> --out <span class="nv">$filename</span>.iconset/icon_256x256@2x.png
        sips -z <span class="m">512</span> <span class="m">512</span> <span class="nv">$1</span> --out <span class="nv">$filename</span>.iconset/icon_512x512.png
        cp <span class="nv">$1</span> <span class="nv">$filename</span>.iconset/icon_512x512@2x.png
        iconutil -c icns <span class="nv">$filename</span>.iconset
        rm -r <span class="nv">$filename</span>.iconset
    <span class="k">fi</span>
<span class="o">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="助手功能">助手功能</h3>
<h4 id="向用户询问密码">向用户询问密码</h4>
<p>使用 AppleScript 创建密码输入框，对用户更友好。</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="k">function</span> gui_password <span class="o">{</span>
    <span class="k">if</span> <span class="o">[[</span> -z <span class="nv">$1</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span>
        <span class="nv">gui_prompt</span><span class="o">=</span><span class="s2">&#34;Password:&#34;</span>
    <span class="k">else</span>
        <span class="nv">gui_prompt</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$1</span><span class="s2">&#34;</span>
    <span class="k">fi</span>
    <span class="nv">PW</span><span class="o">=</span><span class="k">$(</span>osascript <span class="s">&lt;&lt;EOF
</span><span class="s">    tell application &#34;System Events&#34;
</span><span class="s">        activate
</span><span class="s">        text returned of (display dialog &#34;${gui_prompt}&#34; default answer &#34;&#34; with hidden answer)
</span><span class="s">    end tell
</span><span class="s">EOF</span>
    <span class="k">)</span>

    <span class="nb">echo</span> -n <span class="s2">&#34;</span><span class="si">${</span><span class="nv">PW</span><span class="si">}</span><span class="s2">&#34;</span>
<span class="o">}</span>

</code></pre></td></tr></table>
</div>
</div><h2 id="访达">访达</h2>
<h3 id="获取最前面的访达窗口的路径">获取最前面的访达窗口的路径</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span><span class="lnt">9
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="k">function</span> finder_path <span class="o">{</span>
    osascript -e <span class="s1">&#39;tell application &#34;Finder&#34;&#39;</span><span class="se">\
</span><span class="se"></span>        -e <span class="s2">&#34;if (</span><span class="si">${</span><span class="nv">1</span><span class="p">-1</span><span class="si">}</span><span class="s2"> &lt;= (count Finder windows)) then&#34;</span><span class="se">\
</span><span class="se"></span>        -e <span class="s2">&#34;get POSIX path of (target of window </span><span class="si">${</span><span class="nv">1</span><span class="p">-1</span><span class="si">}</span><span class="s2"> as alias)&#34;</span><span class="se">\
</span><span class="se"></span>        -e <span class="s1">&#39;else&#39;</span> <span class="se">\
</span><span class="se"></span>        -e <span class="s1">&#39;get POSIX path of (desktop as alias)&#39;</span><span class="se">\
</span><span class="se"></span>        -e <span class="s1">&#39;end if&#39;</span> <span class="se">\
</span><span class="se"></span>        -e <span class="s1">&#39;end tell&#39;</span><span class="p">;</span>
<span class="o">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="打印访达中选中的文件">打印访达中选中的文件</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash">selected<span class="o">()</span> <span class="o">{</span>
    osascript <span class="s">&lt;&lt;EOT
</span><span class="s">        tell application &#34;Finder&#34;
</span><span class="s">            set theFiles to selection
</span><span class="s">            set theList to &#34;&#34;
</span><span class="s">            repeat with aFile in theFiles
</span><span class="s">                set theList to theList &amp; POSIX path of (aFile as alias) &amp; &#34;\n&#34;
</span><span class="s">            end repeat
</span><span class="s">            theList
</span><span class="s">        end tell
</span><span class="s">EOT</span>
<span class="o">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="将当前访达文件目录设置为分栏视图">将当前访达文件目录设置为分栏视图</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="k">function</span> column_view <span class="o">{</span>
    osascript -e <span class="s1">&#39;set cwd to do shell script &#34;pwd&#34;&#39;</span><span class="se">\
</span><span class="se"></span>      -e <span class="s1">&#39;tell application &#34;Finder&#34;&#39;</span><span class="se">\
</span><span class="se"></span>      -e <span class="s2">&#34;if (</span><span class="si">${</span><span class="nv">1</span><span class="p">-1</span><span class="si">}</span><span class="s2"> &lt;= (count Finder windows)) then&#34;</span><span class="se">\
</span><span class="se"></span>      -e <span class="s2">&#34;set the target of window </span><span class="si">${</span><span class="nv">1</span><span class="p">-1</span><span class="si">}</span><span class="s2"> to (POSIX file cwd) as string&#34;</span><span class="se">\
</span><span class="se"></span>      -e <span class="s2">&#34;set the current view of the front Finder window to column view&#34;</span><span class="se">\
</span><span class="se"></span>      -e <span class="s1">&#39;else&#39;</span> -e <span class="s2">&#34;open (POSIX file cwd) as string&#34;</span><span class="se">\
</span><span class="se"></span>      -e <span class="s2">&#34;set the current view of the front Finder window to column view&#34;</span><span class="se">\
</span><span class="se"></span>      -e <span class="s1">&#39;end if&#39;</span> -e <span class="s1">&#39;end tell&#39;</span><span class="p">;</span>
<span class="o">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="将当前访达文件目录设置为图标视图">将当前访达文件目录设置为图标视图</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="k">function</span> icon_view <span class="o">{</span>
    osascript -e <span class="s1">&#39;set cwd to do shell script &#34;pwd&#34;&#39;</span><span class="se">\
</span><span class="se"></span>      -e <span class="s1">&#39;tell application &#34;Finder&#34;&#39;</span><span class="se">\
</span><span class="se"></span>      -e <span class="s2">&#34;if (</span><span class="si">${</span><span class="nv">1</span><span class="p">-1</span><span class="si">}</span><span class="s2"> &lt;= (count Finder windows)) then&#34;</span><span class="se">\
</span><span class="se"></span>      -e <span class="s2">&#34;set the target of window </span><span class="si">${</span><span class="nv">1</span><span class="p">-1</span><span class="si">}</span><span class="s2"> to (POSIX file cwd) as string&#34;</span><span class="se">\
</span><span class="se"></span>      -e <span class="s2">&#34;set the current view of the front Finder window to icon view&#34;</span><span class="se">\
</span><span class="se"></span>      -e <span class="s1">&#39;else&#39;</span> -e <span class="s2">&#34;open (POSIX file cwd) as string&#34;</span><span class="se">\
</span><span class="se"></span>      -e <span class="s2">&#34;set the current view of the front Finder window to icon view&#34;</span><span class="se">\
</span><span class="se"></span>      -e <span class="s1">&#39;end if&#39;</span> -e <span class="s1">&#39;end tell&#39;</span><span class="p">;</span>
<span class="o">}</span><span class="p">;</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="将当前访达文件目录设置为列表视图">将当前访达文件目录设置为列表视图</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-bash" data-lang="bash"><span class="k">function</span> list_view <span class="o">{</span>
  osascript -e <span class="s1">&#39;set cwd to do shell script &#34;pwd&#34;&#39;</span><span class="se">\
</span><span class="se"></span>    -e <span class="s1">&#39;tell application &#34;Finder&#34;&#39;</span><span class="se">\
</span><span class="se"></span>    -e <span class="s2">&#34;if (</span><span class="si">${</span><span class="nv">1</span><span class="p">-1</span><span class="si">}</span><span class="s2"> &lt;= (count Finder windows)) then&#34;</span><span class="se">\
</span><span class="se"></span>    -e <span class="s2">&#34;set the target of window </span><span class="si">${</span><span class="nv">1</span><span class="p">-1</span><span class="si">}</span><span class="s2"> to (POSIX file cwd) as string&#34;</span><span class="se">\
</span><span class="se"></span>    -e <span class="s2">&#34;set the current view of the front Finder window to list view&#34;</span><span class="se">\
</span><span class="se"></span>    -e <span class="s1">&#39;else&#39;</span> -e <span class="s2">&#34;open (POSIX file cwd) as string&#34;</span><span class="se">\
</span><span class="se"></span>    -e <span class="s2">&#34;set the current view of the front Finder window to list view&#34;</span><span class="se">\
</span><span class="se"></span>    -e <span class="s1">&#39;end if&#39;</span> -e <span class="s1">&#39;end tell&#39;</span><span class="p">;</span><span class="se">\
</span><span class="se"></span><span class="o">}</span>
</code></pre></td></tr></table>
</div>
</div>
  </div>

  <div class="post-copyright">
  <p class="copyright-item">
    <span class="item-title">文章作者</span>
    <span class="item-content">早起的年轻人</span>
  </p>
  <p class="copyright-item">
    <span class="item-title">上次更新</span>
    <span class="item-content">
        2019-05-01 14:25
        
    </span>
  </p>
  
  <p class="copyright-item">
    <span class="item-title">许可协议</span>
    <span class="item-content"><a target="_blank" rel="license noopener" href="https://github.com/nusr/blog/blob/master/LICENSE">MIT</a></span>
  </p>
</div>
<div class="post-reward">
  <input type="checkbox" name="reward" id="reward" hidden />
  <label class="reward-button" for="reward">赞赏支持</label>
  <div class="qr-code">
    
    <label class="qr-code-image" for="reward">
        <img class="image" src="/images/wechat.jpg">
        <span>微信佛系打赏</span>
      </label>
    <label class="qr-code-image" for="reward">
        <img class="image" src="/images/alipay.jpg">
        <span>支付宝佛系打赏</span>
      </label>
  </div>
</div><footer class="post-footer">
    <div class="post-tags">
      <a href="/tags/Awesome/">Awesome</a>
      </div>
    <nav class="post-nav">
      <a class="prev" href="/post/awesome-macos-command-line-zh/snippets/">
        <i class="iconfont icon-left"></i>
        <span class="prev-text nav-default">代码片段</span>
        <span class="prev-text nav-mobile">上一篇</span>
      </a>
      <a class="next" href="/post/awesome-macos-command-line-zh/launchagents/">
        <span class="next-text nav-default">自启动服务</span>
        <span class="next-text nav-mobile">下一篇</span>
        <i class="iconfont icon-right"></i>
      </a>
    </nav>
  </footer>
  
</article>
            </div>
            

        </div>
    </main>

    <footer id="footer" class="footer">
        <div class="social-links">
  <a href="852851198@qq.com" class="iconfont icon-email" title="email" rel="noopener" target="_blank" data-title="email"> </a>
  <a href="https://github.com/ITmxs" class="iconfont icon-github" title="github" rel="noopener" target="_blank" data-title="github"> </a>
  <a href="https://juejin.cn/user/3843548384077192" class="iconfont icon-juejin" title="juejin" rel="noopener" target="_blank" data-title="juejin"> </a>
  <a href="https://www.zhihu.com/people/yimi-yang-guang-96-65" class="iconfont icon-zhihu" title="zhihu" rel="noopener" target="_blank" data-title="zhihu"> </a>
  <a href="https://space.bilibili.com/480883651" class="iconfont icon-bilibili" title="bilibili" rel="noopener" target="_blank" data-title="bilibili"> </a>
  <a href="https://luckly.work/index.xml" type="application/rss+xml" rel="noopener" target="_blank" class="iconfont icon-rss" title="rss"></a>


</div>

<div class="copyright">
  <span class="power-by">
    由 <a class="hexo-link" href="https://gohugo.io">Hugo</a> 强力驱动
  </span>
  <span class="division">|</span>
  <span class="theme-info">
    主题 -
    <a class="theme-link" href="https://github.com/olOwOlo/hugo-theme-even">Even</a>
  </span>

  <div class="busuanzi-footer">
    <span id="busuanzi_container_site_pv"> 本站总访问量 <span id="busuanzi_value_site_pv"><img src="/img/spinner.svg" alt="spinner.svg"/></span> 次 </span>
    <span class="division">|</span>
    <span id="busuanzi_container_site_uv"> 本站总访客数 <span id="busuanzi_value_site_uv"><img src="/img/spinner.svg" alt="spinner.svg"/></span> 人 </span>
  </div>

  <span class="copyright-year">
    &copy;
    2020 -
    2021
    <span class="heart">
      <i class="iconfont icon-heart"></i>
    </span>
    <span class="author">早起的年轻人</span>
  </span>
</div>

    </footer>

    <div class="back-to-top" id="back-to-top">
        <i class="iconfont icon-up"></i>
    </div>
</div>

  <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/slideout@1.0.1/dist/slideout.min.js" integrity="sha256-t+zJ/g8/KXIJMjSVQdnibt4dlaDxc9zXr/9oNPeWqdg=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.js" integrity="sha256-XVLffZaxoWfGUEbdzuLi7pwaUJv1cecsQJQqGLe7axY=" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/timeago.js@3.0.2/dist/timeago.min.js" integrity="sha256-jwCP0NAdCBloaIWTWHmW4i3snUNMHUNO+jr9rYd2iOI=" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/timeago.js@3.0.2/dist/timeago.locales.min.js" integrity="sha256-ZwofwC1Lf/faQCzN7nZtfijVV6hSwxjQMwXL4gn9qU8=" crossorigin="anonymous"></script>
  <script><!-- NOTE: timeago.js uses the language code format like "zh_CN" (underscore and case sensitive) -->
    var languageCode = "zh-CN".replace(/-/g, '_').replace(/_(.*)/, function ($0, $1) {return $0.replace($1, $1.toUpperCase());});
    timeago().render(document.querySelectorAll('.timeago'), languageCode);
    timeago.cancel();  
  </script>
<script type="text/javascript" src="/dist/even.47f727f4.min.js"></script>


<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
	window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
	ga('create', 'UA-138883536-1', 'auto');
	ga('set', 'anonymizeIp', true);
	ga('send', 'pageview');
}
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>







</body>
</html>
